﻿using System;
using System.IO;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.scriptWriter
{
	// Token: 0x020001EE RID: 494
	public class TScriptGenerator
	{
		// Token: 0x060010A7 RID: 4263 RVA: 0x0030D274 File Offset: 0x0030B474
		public TScriptGenerator()
		{
			this.scriptWriter = new TScriptWriter();
			this.scriptGeneratorVisitor = new TScriptGeneratorVisitor(this.scriptWriter);
		}

		// Token: 0x060010A8 RID: 4264 RVA: 0x0030D298 File Offset: 0x0030B498
		public virtual string generateScript(TParseTreeNode parseTreeNode)
		{
			this.scriptWriter.reset();
			parseTreeNode.accept(this.scriptGeneratorVisitor);
			StringWriter stringWriter = new StringWriter();
			this.scriptWriter.writeTo(stringWriter);
			return stringWriter.ToString();
		}

		// Token: 0x04001399 RID: 5017
		private TScriptWriter scriptWriter;

		// Token: 0x0400139A RID: 5018
		private TScriptGeneratorVisitor scriptGeneratorVisitor;
	}
}
